package com.cloudbroker.bcs.platform.dav.bizapi.constants.status;

public enum ApplyStatus {

    UNDER_REVIEW(0, "审核中"),

	PASS(1, "审核通过"),

	FAIL(2, "审核不通过"),
	
	WAIT(3, "待完善信息")

	;

	private final int val;

	private final String description;

	private String toString;

	private ApplyStatus(int val, String description) {
		this.val = val;
		this.description = description;
	}

	public int getVal() {
		return val;
	}

	public String getDescription() {
		return description;
	}

	public static String getDescription(int realVal) {
		for (ClientStatus s : ClientStatus.values()) {
			if (s.getVal() == realVal) {
				return s.getDescription();
			}
		}
		return String.valueOf(realVal);
	}

	@Override
	public String toString() {
		if (null == toString) {
			toString = new StringBuilder().append("ClientStatus[").append(val)
					.append(':').append(description).append(']').toString();
		}
		return toString;
	}

}
